package mock

import (
	"context"
	dv1 "goTong/app/user/srv/data/v1"
	metav1 "goTong/pkg/common/meta/v1"
)

type users struct {
	//users []*dv1.UserDO   模拟数据库   （进行insert之后测试）
}

func (u *users) List(ctx context.Context, orderby []string, opts metav1.ListMeta) (*dv1.UserDOList, error) {
	//TODO implement me
	//panic("implement me")
	return &dv1.UserDOList{
		TotalCount: 1,
		Items:      []*dv1.UserDO{},
	}, nil
}

func (u *users) GetByMobile(ctx context.Context, mobile string) (*dv1.UserDO, error) {
	//TODO implement me
	panic("implement me")
}

func (u *users) GetByID(ctx context.Context, id uint64) (*dv1.UserDO, error) {
	//TODO implement me
	panic("implement me")
}

func (u *users) Create(ctx context.Context, user *dv1.UserDO) error {
	//TODO implement me
	panic("implement me")
}

func (u *users) Update(ctx context.Context, user *dv1.UserDO) error {
	//TODO implement me
	panic("implement me")
}

func NewUsers() *users {
	return &users{}
}

//func (u *users) List(ctx context.Context, opts metav1.ListMeta) (*dv1.UserDOList, error) {
//	//实现gorm查询
//	return &dv1.UserDOList{
//		TotalCount: 1,
//		Items:      []*dv1.UserDO{},
//	}, nil
//}
